<template>
  <div>
    <v-card :loading="loading" :disabled="loading">
      <v-card-title>api接口使用测试</v-card-title>
      <v-card-text>{{apiData}}</v-card-text>
    </v-card>
  </div>
</template>
<script>
import { test } from "@/api/index.js";
export default {
  name: "test",
  data() {
    return {
      loading: false,
      apiData: null,
    };
  },
  created() {
    this.getApiData();
  },
  methods: {
    getApiData() {
      this.loading = true;
      this.apiData = null;
      test().then((res) => {
        this.loading = false;
        this.apiData = res;
      });
    },
  },
};
</script>
